package models;

import java.util.*;

import javax.persistence.*;
import play.db.jpa.Model;

/** 
 * 
 * This Model represents the block relation between the User and Department.
 * It is defined as OneToOne relation between each as every instance of this model has 
 * one User blocked from one Department.
 * 
 * @author Heba
 */

@Entity
public class IdeaDeveloperBlockedFromDepartment extends Model {
	@OneToOne
	public User user;
	@OneToOne
	public Department department;
	public String reason;
	public Date inDate;
	
	/**
	 * The constructor of this model that takes User, Department, String, and Date.
	 * 
	 * @param user User instance
	 * @param department Department instance
	 * @param reason The reason of the block
	 * @param inDate The Time of the block
	 */

	public IdeaDeveloperBlockedFromDepartment(User user, Department department,
			String reason, Date inDate) {
		this.user = user;
		this.department = department;
		this.reason = reason;
		this.inDate = inDate;
	}

}